<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<script type="text/javascript" src="includes/jquery/jquery.js"></script>

</style>
<script type="text/javascript">
   $(document).ready(function(){
	   //通过名字查询
	   $('#stu_name').bind('keyup',func1);
	   function func1(){
		   name=$('#stu_name').val();
		   $.get('index.php',{'group':'Admin','module':'Enter','act':'getName','name':name},function(msg){
			   $('#table').html(msg);
		   });
	   }
	   //通过性别查询
	   $('#stu_sex').bind('keyup',func2);
	   function func2(){
		   sex=$('#stu_sex').val();
		   $.get('index.php',{'group':'Admin','module':'Enter','act':'getSex','sex':sex},function(msg){
			   $('#table').html(msg);
		   });
	   }
	   //通过项目
	   $('#pro_id').bind('change',func3);
	   function func3(){
		   pro_id=$('#pro_id').val();
		   $.get('index.php',{'group':'Admin','module':'Enter','act':'getProject','pro_id':pro_id},function(msg){
			   $('#table').html(msg);
		   });		   
	   }
	   //通过年级查询
	   $('#grade_id').bind('change',func4);
	   function func4(){
		   grade_id=$('#grade_id').val();
		   $.get('index.php',{'group':'Admin','module':'Enter','act':'getGrade','grade_id':grade_id},function(msg){
			   $('#table').html(msg);
		   });		   
	   }
	   //通过班级查询
	   $('#class_id').bind('change',func5);
	   function func5(){
		   class_id=$('#class_id').val();
		   $.get('index.php',{'group':'Admin','module':'Enter','act':'getClass','class_id':class_id},function(msg){
			   $('#table').html(msg);
		   });		   
	   }
   });
</script>
<link rel="stylesheet" type="text/css" href="view/Admin/Enter/image/enter.css">
<body>
<h3>运动会项目分布</h3><br/><br/>
学生名字：<input type="text" id="stu_name">
学生性别：<input type="text" id="stu_sex">
比赛项目：<select name='pro_id' id="pro_id"> 
           <option>【请选择】</option>
           <{foreach $rows as $k=>$v}>
           <option value="<{$k}>" ><{$v['pro_name']}></option>;     
           <{/foreach}>
        </select>
比赛年级：<select name='grade_id' id="grade_id"> 
           <option>【请选择】</option>
           <{foreach $grade_id as $k=>$v}>
           <option value="<{$k}>" ><{$v['grade_name']}></option>;     
           <{/foreach}>
        </select>
 比赛班级：<select name='class_id' id="class_id"> 
		    <option>【请选择】</option>
		    <{foreach $class_id as $k=>$v}>
		    <option value="<{$k}>" ><{$v['class_name']}></option>;     
		    <{/foreach}>
        </select>
<div id="table"></div>
</table>
</body>
</html>
